<?php

/**
 * CargaNoLectiva form base class.
 *
 * @package    form
 * @subpackage carga_no_lectiva
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseCargaNoLectivaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'docente_id'          => new sfWidgetFormDoctrineChoice(array('model' => 'Docente', 'add_empty' => false)),
      'hora_ingreso'        => new sfWidgetFormTime(),
      'hora_salida'         => new sfWidgetFormTime(),
      'dia_semana'          => new sfWidgetFormChoice(array('choices' => array('Monday' => 'Monday', 'Sunday' => 'Sunday', 'Tuesday' => 'Tuesday', 'Wednesday' => 'Wednesday', 'Thursday' => 'Thursday', 'Friday' => 'Friday', 'Saturday' => 'Saturday'))),
      'observaciones'       => new sfWidgetFormTextarea(),
      'estado'              => new sfWidgetFormInput(),
      'fecha_creacion'      => new sfWidgetFormDateTime(),
      'fecha_actualizacion' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorDoctrineChoice(array('model' => 'CargaNoLectiva', 'column' => 'id', 'required' => false)),
      'docente_id'          => new sfValidatorDoctrineChoice(array('model' => 'Docente')),
      'hora_ingreso'        => new sfValidatorTime(),
      'hora_salida'         => new sfValidatorTime(array('required' => false)),
      'dia_semana'          => new sfValidatorChoice(array('choices' => array('Monday' => 'Monday', 'Sunday' => 'Sunday', 'Tuesday' => 'Tuesday', 'Wednesday' => 'Wednesday', 'Thursday' => 'Thursday', 'Friday' => 'Friday', 'Saturday' => 'Saturday'))),
      'observaciones'       => new sfValidatorString(array('required' => false)),
      'estado'              => new sfValidatorString(array('max_length' => 1)),
      'fecha_creacion'      => new sfValidatorDateTime(array('required' => false)),
      'fecha_actualizacion' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('carga_no_lectiva[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'CargaNoLectiva';
  }

}
